/*
 *    Copyright (c) 2018-2025, cloud All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: cloud
 */

package com.fuyao.cloud.space.storey.service;

import cn.hutool.core.lang.tree.Tree;
import cn.hutool.core.lang.tree.TreeNode;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fuyao.cloud.common.core.util.R;
import com.fuyao.cloud.space.dto.RoomStoreyDTO;
import com.fuyao.cloud.space.entity.RoomStorey;

import java.util.List;

/**
 * 楼层管理
 *
 * @author 时间的朋友
 * @date 2021-11-11 15:30:25
 */
public interface RoomStoreyService extends IService<RoomStorey> {

    boolean saveList(RoomStoreyDTO fyRoomStorey);


	/**
	 * 查询树形方法
	 * @return
	 */
	List<Tree<String>> selectTree();

	/**
	 * 获取树形节点
	 * @return
	 */
	List<TreeNode<String>> getTreeNode();

	/**
	 * 点击树形菜单查询数据
	 * @param page        前端分页
	 * @param id          可以是自己的id，也肯能时父类的id
	 * @param affiliName  所属模块名称
	 * @return
	 */
	Page<RoomStorey> getTreePage(Page page, Long id, String affiliName);

	/**
	 * 根据父id 查询参数
	 * @param id
	 * @param affiliName
	 * @return
	 */
	List<Long> getTreeParam(Long id, String affiliName);

	/**
	 * 懒加载树
	 * @param edificeId “EDIFICE-id”
	 * @return
	 */
	List<Tree<String>> lazyTree(String edificeId);

	/**
	 * 懒加载树
	 * @param edificeId 楼栋id
	 * @return
	 */
	List<Tree<String>> lazyTree(Long edificeId);

	/**
	 * 批量删除
 	 * @param ids 楼层管理ids
	 * @return R
	 */
	R batchDelete(List<Long> ids);

}
